from appium.webdriver.common.appiumby import AppiumBy

from base.search_base import SearchBase


class SearchPage(SearchBase):
    def search_bar_for_input_send(self,driver,value):
        search_bar_for_input_xpash=self.search_bar_for_input()
        return self.send_keys_new(driver,AppiumBy.XPATH,search_bar_for_input_xpash,value)

    def search_button_click(self,driver):
        search_button_xpash=self.search_button()
        return self.click_new(driver,AppiumBy.XPATH,search_button_xpash)

    def get_assert_value(self,driver):
        book_title_xpash=self.book_title()
        return self.get_text(driver,AppiumBy.XPATH,book_title_xpash)



